'''
@Author       : 冯浩
@Date         : 2019-12-26 23:53:00
@LastEditors  : 冯浩
@LastEditTime : 2019-12-30 23:32:51
@FilePath     : \FQ统计\fq.py
'''
import xlwings as xw
import os

path = r"D:\bob_develop\python\FQ统计\sap\pr3.XLSX"

app = xw.App(visible=False, add_book=False)

wb = app.books.open(path)
xl_con = wb.sheets(1).range('A1', 'Z5000').value

wb.save()
wb.close()
app.quit()

print('正在处理%s' % path, len(xl_con))

# for i in xl_con:
#     print(i)

# print(wb.fullname)
# print(wb.sheets(1).range(cell1='A1').value)
# print(wb.sheets(1).range((1, 1), (10, 20)).value)




